feat(VoiceServer): local TTS support, voice personalities, and automatic ElevenLabs fallback#1101
Open
salaheldinaz wants to merge 4 commits intodanielmiessler:mainfrom
Open
feat(VoiceServer): local TTS support, voice personalities, and automatic ElevenLabs fallback#1101salaheldinaz wants to merge 4 commits intodanielmiessler:mainfrom
salaheldinaz wants to merge 4 commits intodanielmiessler:mainfrom
Conversation
…lback - Fix .env loading path: try ~/.config/PAI/.env first (PAI standard location), fall back to ~/.env — resolves api_key_configured always showing false - Add playLocalSpeech() using macOS say command (no API key required) - Add tts_provider config: set voiceServer.tts_provider = "local" in settings.json to use local TTS exclusively; defaults to "elevenlabs" - Add localVoice config: voiceServer.local_voice sets the macOS voice (default: Samantha) - Automatic fallback: when ElevenLabs fails (402, network error, etc.), server silently retries with local TTS so notifications always play - Update /health endpoint: exposes tts_provider, local_voice, local_tts_available, renames api_key_configured → elevenlabs_api_key_configured for clarity - Update startup log to show active TTS mode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…local endpoint - Add curated LOCAL_VOICE_CATALOGUE with 22 realistic English voices grouped by category (natural/classic) with accent, gender, and personality descriptions - Add getInstalledLocalVoices() that cross-references the catalogue against voices actually installed on the system via `say -v ?` - Add GET /voices/local endpoint: returns full catalogue with active voice marked and instructions for switching (set voiceServer.local_voice in settings.json) - Surface /voices/local in the root response for discoverability Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… fallback Merges feature/local-tts-fallback into main. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds kokoro-fastapi as a third TTS provider alongside ElevenLabs and local macOS say. Configure via settings.json voiceServer.tts_provider, kokoro_url, and kokoro_voice. Falls back to local TTS on connection failure. Also extracts shared preprocessForTTS() helper (removes pronunciation log duplication between providers) and fixes a temp file leak in playAudio's error handler. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
~/.envbut PAI stores the key at~/.config/PAI/.env, causingelevenlabs_api_key_configuredto always reportfalseand silently skipping all TTS audiosaycommand (zero dependencies, no API key) via newplayLocalSpeech()naturalandclassiccategoriesGET /voices/localendpoint — lists voices installed on the system with the active voice marked and instructions for switching/healthresponse — now exposestts_provider,local_voice,local_tts_available; renamesapi_key_configured→elevenlabs_api_key_configuredConfiguration
No breaking changes. Existing installs behave identically. To customise local TTS add to
~/.claude/settings.json:tts_provideroptions:"elevenlabs"(default — ElevenLabs with local fallback) or"local"(always local, no API call).Browse available voices on your system:
Test plan
/healthreturnslocal_tts_available: trueand correcttts_providerGET /voices/localreturns catalogue with active voice marked200tts_provider: "local"→ local TTS used directly, no ElevenLabs calltts_provider: "elevenlabs"with valid paid key → ElevenLabs used, unchanged behaviour.envloaded correctly from~/.config/PAI/.env🤖 Generated with Claude Code